package com.veo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("/restful")
public class Restful {

    @RequestMapping(value = "/save",method = RequestMethod.POST)
    public String save(@RequestParam("username") String name){
        System.out.println("save......"+name);
        return "success";
    }

    @RequestMapping(value = "/update/{id}",method = RequestMethod.PUT)
    public String update(@PathVariable("id") String id){
        System.out.println("update......"+id);
        return "success";
    }

    @RequestMapping(value = "/del/{id}",method = RequestMethod.DELETE)
    public String del(@PathVariable("id") String id){
        System.out.println("del......"+id);
        return "success";
    }

    @RequestMapping(value = "/get/{id}",method = RequestMethod.GET)
    public String get(@PathVariable("id") String id){
        System.out.println("get......"+id);
        return "success";
    }





}
